package zuoye05;

import java.util.Scanner;

public class hm5_fanzhuan {
	public static void main(String[] args) {
		String str="abcdefg";
		reverse(str,3,5);
	}
	public static String reverse(String str,int start,int end){
		
		if(str!=null){
			char[] arr=str.toCharArray();
			for(int x=start,y=end;x<y;x++,y--){
				char temp=arr[x];
				arr[x]=arr[y];
				arr[y]=temp;
				
			}
			return new String(arr);
			
		}
		return null;
		
	}
}
